package com.dragon.modules.yuegou.query.member;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.member.MemberGradeLogEntity;
import com.dragon.modules.yuegou.enums.member.MemberGradeLogGradeRule;
import com.dragon.modules.yuegou.enums.member.MemberGradeLogType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 会员等级更新日志 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2022-03-02 15:12:03
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MemberGradeLogQuery extends MemberGradeLogEntity implements Query<MemberGradeLogEntity>{

	private static final long serialVersionUID = 1L;


    /** 主键查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** [枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件 */
	@JsonUnwrapped(prefix = "type")
	private Condition<MemberGradeLogType> typeCondition;

    /** [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件 */
	@JsonUnwrapped(prefix = "gradeRule")
	private Condition<MemberGradeLogGradeRule> gradeRuleCondition;

    /** 变化前id查询条件 */
	@JsonUnwrapped(prefix = "beforeGradeId")
	private Condition<String> beforeGradeIdCondition;

    /** 更新前等级查询条件 */
	@JsonUnwrapped(prefix = "beforeGrade")
	private Condition<String> beforeGradeCondition;

    /** 变化后id查询条件 */
	@JsonUnwrapped(prefix = "alferGradeId")
	private Condition<String> alferGradeIdCondition;

    /** 更新后等级查询条件 */
	@JsonUnwrapped(prefix = "afterGrade")
	private Condition<String> afterGradeCondition;

    /** 更新原因查询条件 */
	@JsonUnwrapped(prefix = "reason")
	private Condition<String> reasonCondition;

    /** 创建人id查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建人查询条件 */
	@JsonUnwrapped(prefix = "createdName")
	private Condition<String> createdNameCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MemberGradeLogQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public MemberGradeLogQuery(MemberGradeLogEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public MemberGradeLogQuery(MemberGradeLogQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.typeCondition != null) {
			this.typeCondition = other.typeCondition.copy();
		}
		if(other.gradeRuleCondition != null) {
			this.gradeRuleCondition = other.gradeRuleCondition.copy();
		}
		if(other.beforeGradeIdCondition != null) {
			this.beforeGradeIdCondition = other.beforeGradeIdCondition.copy();
		}
		if(other.beforeGradeCondition != null) {
			this.beforeGradeCondition = other.beforeGradeCondition.copy();
		}
		if(other.alferGradeIdCondition != null) {
			this.alferGradeIdCondition = other.alferGradeIdCondition.copy();
		}
		if(other.afterGradeCondition != null) {
			this.afterGradeCondition = other.afterGradeCondition.copy();
		}
		if(other.reasonCondition != null) {
			this.reasonCondition = other.reasonCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdNameCondition != null) {
			this.createdNameCondition = other.createdNameCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MemberGradeLogEntity> toQueryWrapper() {
		QueryWrapper<MemberGradeLogEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (typeCondition != null) {
			typeCondition.toWrapper(wrapper, COL_TYPE);
		}
		if (gradeRuleCondition != null) {
			gradeRuleCondition.toWrapper(wrapper, COL_GRADE_RULE);
		}
		if (beforeGradeIdCondition != null) {
			beforeGradeIdCondition.toWrapper(wrapper, COL_BEFORE_GRADE_ID);
		}
		if (beforeGradeCondition != null) {
			beforeGradeCondition.toWrapper(wrapper, COL_BEFORE_GRADE);
		}
		if (alferGradeIdCondition != null) {
			alferGradeIdCondition.toWrapper(wrapper, COL_ALFER_GRADE_ID);
		}
		if (afterGradeCondition != null) {
			afterGradeCondition.toWrapper(wrapper, COL_AFTER_GRADE);
		}
		if (reasonCondition != null) {
			reasonCondition.toWrapper(wrapper, COL_REASON);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdNameCondition != null) {
			createdNameCondition.toWrapper(wrapper, COL_CREATED_NAME);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}
	
	/**
	 * 构造并返回主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置主键查询条件
	 * 
	 * @param idCondition 主键查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回[枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 * 
	 * @return typeCondition [枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 */
	public Condition<MemberGradeLogType> type() {
		this.typeCondition = new Condition<>();
		return this.typeCondition;
	}
	
	/**
	 * 获取[枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 * 
	 * @return typeCondition [枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 */
	public Condition<MemberGradeLogType> getTypeCondition() {
		return typeCondition;
	}

	/**
	 * 设置[枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 * 
	 * @param typeCondition [枚举]日志类型：0-创建会员-VIP_CREATE、1-会员升级-VIP_UPGRADE、2-会员降级-VIP_DEMOTION、3-旧会员变更-OLD_MEMBER查询条件
	 */
	public void setTypeCondition(Condition<MemberGradeLogType> typeCondition) {
		this.typeCondition = typeCondition;
	}

	/**
	 * 构造并返回[枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 * 
	 * @return gradeRuleCondition [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 */
	public Condition<MemberGradeLogGradeRule> gradeRule() {
		this.gradeRuleCondition = new Condition<>();
		return this.gradeRuleCondition;
	}
	
	/**
	 * 获取[枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 * 
	 * @return gradeRuleCondition [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 */
	public Condition<MemberGradeLogGradeRule> getGradeRuleCondition() {
		return gradeRuleCondition;
	}

	/**
	 * 设置[枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 * 
	 * @param gradeRuleCondition [枚举]等级规则：0-成长值-GROWTH、1-指定条件-SPECIFIED查询条件
	 */
	public void setGradeRuleCondition(Condition<MemberGradeLogGradeRule> gradeRuleCondition) {
		this.gradeRuleCondition = gradeRuleCondition;
	}

	/**
	 * 构造并返回变化前id查询条件
	 * 
	 * @return beforeGradeIdCondition 变化前id查询条件
	 */
	public Condition<String> beforeGradeId() {
		this.beforeGradeIdCondition = new Condition<>();
		return this.beforeGradeIdCondition;
	}
	
	/**
	 * 获取变化前id查询条件
	 * 
	 * @return beforeGradeIdCondition 变化前id查询条件
	 */
	public Condition<String> getBeforeGradeIdCondition() {
		return beforeGradeIdCondition;
	}

	/**
	 * 设置变化前id查询条件
	 * 
	 * @param beforeGradeIdCondition 变化前id查询条件
	 */
	public void setBeforeGradeIdCondition(Condition<String> beforeGradeIdCondition) {
		this.beforeGradeIdCondition = beforeGradeIdCondition;
	}

	/**
	 * 构造并返回更新前等级查询条件
	 * 
	 * @return beforeGradeCondition 更新前等级查询条件
	 */
	public Condition<String> beforeGrade() {
		this.beforeGradeCondition = new Condition<>();
		return this.beforeGradeCondition;
	}
	
	/**
	 * 获取更新前等级查询条件
	 * 
	 * @return beforeGradeCondition 更新前等级查询条件
	 */
	public Condition<String> getBeforeGradeCondition() {
		return beforeGradeCondition;
	}

	/**
	 * 设置更新前等级查询条件
	 * 
	 * @param beforeGradeCondition 更新前等级查询条件
	 */
	public void setBeforeGradeCondition(Condition<String> beforeGradeCondition) {
		this.beforeGradeCondition = beforeGradeCondition;
	}

	/**
	 * 构造并返回变化后id查询条件
	 * 
	 * @return alferGradeIdCondition 变化后id查询条件
	 */
	public Condition<String> alferGradeId() {
		this.alferGradeIdCondition = new Condition<>();
		return this.alferGradeIdCondition;
	}
	
	/**
	 * 获取变化后id查询条件
	 * 
	 * @return alferGradeIdCondition 变化后id查询条件
	 */
	public Condition<String> getAlferGradeIdCondition() {
		return alferGradeIdCondition;
	}

	/**
	 * 设置变化后id查询条件
	 * 
	 * @param alferGradeIdCondition 变化后id查询条件
	 */
	public void setAlferGradeIdCondition(Condition<String> alferGradeIdCondition) {
		this.alferGradeIdCondition = alferGradeIdCondition;
	}

	/**
	 * 构造并返回更新后等级查询条件
	 * 
	 * @return afterGradeCondition 更新后等级查询条件
	 */
	public Condition<String> afterGrade() {
		this.afterGradeCondition = new Condition<>();
		return this.afterGradeCondition;
	}
	
	/**
	 * 获取更新后等级查询条件
	 * 
	 * @return afterGradeCondition 更新后等级查询条件
	 */
	public Condition<String> getAfterGradeCondition() {
		return afterGradeCondition;
	}

	/**
	 * 设置更新后等级查询条件
	 * 
	 * @param afterGradeCondition 更新后等级查询条件
	 */
	public void setAfterGradeCondition(Condition<String> afterGradeCondition) {
		this.afterGradeCondition = afterGradeCondition;
	}

	/**
	 * 构造并返回更新原因查询条件
	 * 
	 * @return reasonCondition 更新原因查询条件
	 */
	public Condition<String> reason() {
		this.reasonCondition = new Condition<>();
		return this.reasonCondition;
	}
	
	/**
	 * 获取更新原因查询条件
	 * 
	 * @return reasonCondition 更新原因查询条件
	 */
	public Condition<String> getReasonCondition() {
		return reasonCondition;
	}

	/**
	 * 设置更新原因查询条件
	 * 
	 * @param reasonCondition 更新原因查询条件
	 */
	public void setReasonCondition(Condition<String> reasonCondition) {
		this.reasonCondition = reasonCondition;
	}

	/**
	 * 构造并返回创建人id查询条件
	 * 
	 * @return createdByCondition 创建人id查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人id查询条件
	 * 
	 * @return createdByCondition 创建人id查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人id查询条件
	 * 
	 * @param createdByCondition 创建人id查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建人查询条件
	 * 
	 * @return createdNameCondition 创建人查询条件
	 */
	public Condition<String> createdName() {
		this.createdNameCondition = new Condition<>();
		return this.createdNameCondition;
	}
	
	/**
	 * 获取创建人查询条件
	 * 
	 * @return createdNameCondition 创建人查询条件
	 */
	public Condition<String> getCreatedNameCondition() {
		return createdNameCondition;
	}

	/**
	 * 设置创建人查询条件
	 * 
	 * @param createdNameCondition 创建人查询条件
	 */
	public void setCreatedNameCondition(Condition<String> createdNameCondition) {
		this.createdNameCondition = createdNameCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
